{include file="Public:header" /}
{include file="Public:nav" /}
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

		<div class="content">
			<div class="search pad20">
				<!--定位：广州 -->
				<!--<div class="in_map">
					<i class="iconfont icon-map"></i><span id="city-picker">{$city}</span>
				</div> -->
				<!--change 我的
				<div class="in_map">
					<i class="iconfont icon-map"></i><span  id="">我的</span>
				</div>-->
				<a   style="width: 20%; margin-top: 9px;"
                     class="tab-item open-indicator {if condition="$active eq 'user'"} active {/if}" href="{:U('Users/index')}">
				<span class="icon iconfont icon-account" style=" padding-left: 16px;"></span>
			<!-- 	<span class="tab-label">我的</span>-->
				</a>


				<form action="{:U('ActivityCategory/activityList')}" method="post" style="width:100%;">	
				<div class="in_search">
					<div class="searchbar">
						<a class="searchbar-cancel">取消</a>
						
						<div class="search-input">
							<label class="icon icon-search" for="search"></label>
							<input type="activity_name" id='search' placeholder='输入关键字...' />
						</div>
					</div>
				</div>
				</form>
			</div>
			<style>
				.in_tab a i{
					margin: 0 auto !important;
				}
			</style>
		<!--	<div class="swiper-container swiper-container-horizontal">
				<div class="swiper-wrapper">
				{foreach name="benner" item="benner" key="k"}
					<div class="swiper-slide"><a href="{$benner['link']}"><img src="{$benner['advert_img']}"></a></div>
				{/foreach}
				</div>
				<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets">
					<span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span>
					<span class="swiper-pagination-bullet"></span>
				</div>
			</div>  -->
			<div class="card in_list_icon">
				<!--<div class="card-header">活动分类
					<a href="{:U('/ActivityCategory/index')}" class="pull-right">更多>></a></div>-->


				<div class="buttons-tab screen mechanism-tab clearfix" style="margin-top:10px;"id="mechanism-tab">
					<a  style="display:inline-block;width: 3.8rem;" class="tab-link button">军事训练营</a>
					<a  style="display:inline-block;width: 3.8rem;" class="tab-link button">国防大讲堂</a>
					<a  style="display:inline-block;width: 3.8rem;" class="tab-link button">骨干培训班</a>
					<a  style="display:inline-block;width: 3.8rem;" class="tab-link button">知识竞赛</a>
					<a  style="display:inline-block;width: 3.8rem;" class="tab-link button">更多</a>

					<a href="{:U('/ActivityCategory/index')}" style="display:inline-block;width: 4.5rem;"
					   class="tab-link button">更多>></a>
					<!--<span class="tab-link button active">爱国主义教育2</span>-->
				</div>




				<!--原先的-->
			<!--	<div class="card-content">
					<div class="row">
						{foreach name="category" item="category" key="k"}
						<div class="col-33"><a href="{:U('ActivityCategory/activityList', array('category'=>$category['id']))}"><i class="{$category['ico_img']}"></i>{$category['name']}</a></div>
						{/foreach}
					</div>
				</div>-->
			</div>

         <!--   <div class="buttons-tab in_tab" style="margin-top:10px;">
				<a href="{:U('Answer/answer_index#router1')}" class="button"><i class="fa fa-mortar-board fa-5x"></i>知识竞赛</a>
				<a href="{:U('Apply/apply')}" class="button"><i style="background:green;" class="fa fa-street-view fa-5x"></i>专家预约</a>
				<a href="{:U('Serve/base_index')}" class="button"><i style="background:#3cbfb3;" class="fa fa-building fa-5x"></i>基地服务</a>
			</div>
			-->

			
			<div class="card in_list_icon in_bodies">
			<!--	<div class="card-header">专家类型
                                    <a href="{:U('Apply/apply')}" class="pull-right">更多>></a>
				</div>
				<div class="card-content clearfix">
					<ul>
                                            <li><a href="{:U('Apply/apply',array('type'=>1))}">军事专家 </a></li>
						<li><a href="{:U('Apply/apply',array('type'=>2))}">国防专家 </a></li>
						<li><a href="{:U('Apply/apply',array('type'=>3))}">医学专家</a></li>
                                                <li><a href="#">地质专家</a></li>
					</ul>
				</div> -->
			<!--	<div class="card-header">延伸服务<a href="{:U('Serve/hotelList')}" class="pull-right">更多>></a></div>
				<div class="card-content clearfix">
					<ul>
						<li><a href="{:U('Serve/hotelList')}"><i class="iconfont icon-shichang"></i>酒店服务</a></li>
						<li><a href="{:U('Serve/trafficList')}"><i class="iconfont icon-sport"></i>交通服务</a></li>
					</ul>
				</div> -->
			</div>
			


			<div class="card expert hot">
				<div class="card-header">
					<h1 class="title">热门活动</h1></div>
				<div class="card-content">
				<a href="/Index/notice">
					<div class="card-content-inner clearfix">
						<i class="iconfont icon-remind"></i>关于严厉禁止一切侵权行为的公告
					</div>
				</a>
				</div>
			</div>
			<div class="in_hot_box">
			<div class="list_activity_data">
			 {foreach name="activity" item="activity" key="k"}
				<div class="card demo-card-header-pic">
					<!-- <a href="{:U('ActivityDetail/index', array('activity_id'=>$activity['id'],'city'=>$city_select))}"> -->
					<a href="/ActivityDetail/index?activity_id={$activity['id']}&city={$city_select}">
					<div class="card-header">
						<p><span class="iconfont icon-huiyuan1"></span> {$activity['sponsor']}</p>
						<!-- <img class="card-header-img" src="__PUBLIC__/Home/activity/img/raw_1499150972.jpeg" > -->
					</div>
					<div valign="bottom" class="card-header color-white no-border no-padding">
						<img class="card-cover" src="{$activity['activity_img']}" alt="">
					</div>
					<div class="card-content">
						<div class="card-content-inner">
						<p class="hot_list_title">{$activity['activity_name']}</p>
						<p class="color-gray"><i class="iconfont icon-clock"></i>{$activity['start_time']|date="Y-m-d H:i",###} 至 {$activity['end_time']|date="Y-m-d H:i",###}</p>
						<p class="color-gray"><i class="iconfont icon-map"></i>{$activity['area']}</p>
						<span class="jg">￥<font>{$activity['price']}</font></span></div>
					</div>
					</a>
				</div>
			  {/foreach}
			</div>  
			
			<div class="infinite-scroll-preloader" style="display:none;">
				<div class="preloader"></div>
			</div>
			{if condition="$activity['activity_name'] neq ''"}
			<p onclick="ajax_sourch_submit();" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
			{else/}
			<p id="load_more"> 没有{$city}的活动！</p>
			{/if}
				
			</div>
		</div>

{include file="Public:city_box" /}
{include file="Public:footer" /}

<script>
        $(function(){
            var $divWidth = $('#imgsize ul li img').width();
            $('#imgsize ul li img').css({'height':$divWidth});
        })
    

var index_url = "{:U('Index/index')}";
var  page = 1;
 /*** ajax 提交表单 查询订单列表结果*/  
 function ajax_sourch_submit()
 {	 	 	 
	 	$(".infinite-scroll-preloader").show();
        page += 1;
		$.ajax({
			type : "GET",
			//url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
			url:"/Index/index/is_ajax/1/p/"+page+'/city/{$city_select}',//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
			success: function(data)
			{
				$(".infinite-scroll-preloader").hide();
				if($.trim(data) == ''){
					$('#load_more').hide();
				}else{
				    $(".list_activity_data").append(data);
				}
			}
		}); 
 } 
</script>